/**
 * Copyright (c) Enalean, 2018. All Rights Reserved.
 *
 * This file is a part of Tuleap.
 *
 * Tuleap is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * Tuleap is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with Tuleap. If not, see <http://www.gnu.org/licenses/>.
 */

.git-repository-commit-diff-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.git-repository-commit-diff-file-header {
    display: flex;
    padding: $tlp-spacing;
    background: mix($tlp-theme-background-color, $tlp-ui-white, 50%);

    .git-repository-commit-file-status {
        font-size: 16px;
    }
}

.git-repository-commit-diff-file-header-spacer {
    flex: 1;
}

.git-repository-commit-diff-file-header-element:not(:first-child) {
    margin: 0 0 0 $tlp-spacing;
}

.git-repository-diff-side-by-side,
.git-repository-diff {
    font-family: monospace;
    font-size: 14px;
    line-height: 20px;
}

.git-repository-diff-line {
    white-space: pre-wrap;
}

.git-repository-diff-side-by-side-line {
    display: flex;
    width: 100%;
    margin: 0 $tlp-spacing;
}

.git-repository-diff-line-left,
.git-repository-diff-line-right {
    width: calc(50% - #{$tlp-spacing});
    min-height: 20px;
    white-space: pre-wrap;
}

.git-repository-diff-line-left {
    padding: 0 $tlp-half-spacing 0 0;
    border-right: 1px solid $tlp-ui-border-light;
}

.git-repository-diff-line-right {
    padding: 0 0 0 $tlp-half-spacing;
}

.git-repository-diff-side-by-side > .git-repository-diff-side-by-side-line {
    &:first-child {
        > .git-repository-diff-line-left {
            padding: $tlp-spacing $tlp-half-spacing 0 0;
        }

        > .git-repository-diff-line-right {
            padding: $tlp-spacing 0 0 $tlp-half-spacing;
        }
    }

    &:last-child {
        > .git-repository-diff-line-left {
            padding: 0 $tlp-half-spacing $tlp-spacing 0;
        }

        > .git-repository-diff-line-right {
            padding: 0 0 $tlp-spacing $tlp-half-spacing;
        }
    }
}

.git-repository-diff-line-added {
    color: $tlp-ui-success;
}

.git-repository-diff-line-deleted {
    color: $tlp-ui-danger;
}

.git-repository-diff-line-at {
    color: #990099;
}
